package com.framework.network.interceptor.commoninter

import android.content.Context
import okhttp3.Request

class ParamsContext(private val request: Request, private val context: Context) {
    private var iRequestParam: IRequestParam? = null

    val inRequest: Request
        get() {
            when (request.method) {
                "GET" -> iRequestParam = GetRequestParams(context)
                "POST" -> iRequestParam = PostRequestParams(context)
                "PUT" -> iRequestParam = PutRequestParams(context)
            }
            return iRequestParam!!.getRequest(request, context)
        }
}